package com.hzncc.flowable_diboot.project_contracts.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
* 项目类合同评审 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-10-14
* Copyright © MyCorp
*/

@TableName("mdl_project_contract_audit")
@Getter @Setter @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class ProjectContractAudit extends BaseModel {
    private static final long serialVersionUID = 1828916858461200867L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 合同编号
     */
    @Length(max=100, message="合同编号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contractCode;

    /**
     * 合同版本号
     */
    @TableField()
    private Long contractVersion;

    /**
     * 客户ID
     */
    @TableField()
    private String customerId;

    /**
     * 客户名称
     */
    @TableField()
    @BindQuery(comparison = Comparison.LIKE)
    private String customerName;

    /**
     * 负责人
     */
    @Length(max=100, message="负责人长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String header;

    /**
     * 销售员
     */
    @Length(max=100, message="销售员长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String saler;

    /**
     * 签订部门
     */
    @Length(max=100, message="签订部门长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String businessDept;

    /**
     * 签订人
     */
    @Length(max=100, message="签订人长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String signer;

    /**
     * 合同类型
     */
    @TableField()
    private String contractType;

    /**
     * 评审时间
     */
    @TableField()
    private LocalDateTime auditTime;

    /**
     * 流程实例ID
     */
    @Length(max=100, message="流程实例ID长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String instanceId;

    /**
     * OA状态
     */
    @TableField()
    private String oaStatus;

    /**
     * OA响应消息
     */
    @Length(max=200, message="OA响应消息长度应小于200")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String oaMsg;

    /**
     * 产品供销合同OA状态
     */
    @TableField()
    private String samOaStatus;

    /**
     * 产品供销合同OA响应消息
     */
    @Length(max=200, message="产品供销合同OA响应消息长度应小于200")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String samOaMsg;

    /**
     * 产品供销合同审批类型
     */
    @Length(max=10, message="产品供销合同审批类型长度应小于10")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String samAuditType;

    /**
     * SAP状态
     */
    @TableField()
    private String sapStatus;

    /**
     * SAP响应消息
     */
    @Length(max=100, message="SAP响应消息长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String sapMsg;

    /**
     * 系统合同状态
     */
    @Length(max=100, message="系统合同状态长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contractStatus;

    /**
     * 审批类型
     */
    @Length(max=100, message="审批类型长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String auditType;

    /**
     * 业务板块
     */
    @TableField()
    private String businessModel;

    /**
     * 关注人
     */
    @TableField(exist = false)
    private List<String> starUids;

    /**
     * 项目类型
     */
    @TableField()
    private String projectType;

    /**
     * 片区
     */
    @TableField()
    private String salesTerritory;

    /**
     * 外部合同号
     */
    @Length(max=100, message="外部合同号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String externalContractCode;

    /**
     * 客户类型
     */
    @TableField()
    private String cutomerCate;

    /**
     * 计划下达时间
     */
    @TableField()
    private LocalDateTime plannedReleaseTime;

    /**
     * 计划发货时间 
     */
    @TableField()
    private LocalDateTime plannedDeliveryTime;

    /**
     * 国家
     */
    @Length(max=100, message="国家长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String countries;

    /**
     * 开标日期
     */
    @TableField()
    private LocalDateTime bidOpeningDate;

    /**
     * 录入人
     */
    @TableField()
    private String entryPerson;

    /**
     * 是否工业互联网事业部审批
     */
    @TableField()
    private Boolean internetAudit;

    /**
     * 是否智能产线事业部审批
     */
    @TableField()
    private Boolean intelligentAudit;

    /**
     * 填写日期
     */
    @TableField()
    private LocalDateTime writeDate;

    /**
     * SAP合同号
     */
    @Length(max=100, message="SAP合同号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String sapContractCode;

    /**
     * 合同分类
     */
    @TableField()
    private Integer cate;

    /**
     * 变更标识
     */
    @TableField()
    private Integer projChangeFlag;

    /**
     * 产品供销合同变更标识
     */
    @TableField()
    private Integer samChangeFlag;

    /**
     * 商机id
     */
    @Length(max = 32, message = "商机id长度应小于32")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String businessId;

    /**
     * 商机编码
     */
    @Length(max = 50, message = "商机编码长度应小于50")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String businessCode;

    /**
     * 商机名称
     */
    @Length(max = 100, message = "商机名称长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String businessName;

    /**
     * 状态
     */
    @TableField()
    private String status;

    /**
     * 审核附件
     */
    @TableField
    private String auditAttachment;

    /**
     * 最终用户
     */
    @BindQuery(comparison = Comparison.LIKE)
    @TableField
    private String finalUser;

    /**
     * 客户性质
     */
    @TableField
    private String customerNature;

    /**
     * 支付方式
     */
    @BindQuery(comparison = Comparison.LIKE)   @BindQuery
    @TableField
    private String paymentMethod;

    /**
     * 质保期
     */
    @TableField
    private String warrantyPeriod;

    /**
     * 交货期
     */
    @TableField
    private String deliveryDate;

    /**
     * 账龄
     */
    @TableField
    private String aging;

    /**
     * 老应收合同类型
     */
    @TableField
    private String contractModel;

    /**
     * 最后物料编号
     */
    @TableField
    private Long lastNum;
}